export const formatDuration = (time: number) => {
    const seconds: number = time % 60;
    const minutes: number = Math.floor(time / 60) % 60;
    const hours: number = Math.floor(time / 3600) % 24;
    const days: number = Math.floor(time / 86400);
    return `${days ? `${days}天` : ''}${hours ? `${hours}小时` : ''}${minutes ? `${minutes}分钟` : ''}${seconds ? `${seconds}秒` : ''}`;
};